package com.yingjia.yingjiauniversity.http.exception;

/**
 * Created by acer on 2018/6/19.
 */

public class BaseException extends Exception {
    public static final int UN_KNOW_ERROR = 1000;
    public static final int ANALYTIC_SERVER_DATA_ERROR = 1000;
    public static final int JSON_SYNTAX_DATA_ERROR = 1000;
    public static final int NETWORK_ERROR = 1000;

    private String msg;
    private String code;

    public BaseException(Throwable cause, String msg, String code) {
        super(cause);
        this.msg = msg;
        this.code = code;
    }

    public BaseException(String message, String msg) {
        super(message);
        this.msg = msg;
    }

    public BaseException(Throwable cause, String code) {
        super(cause);
        this.code = code;
    }

    public String getMsg() {
        return msg == null ? "" : msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }

    public String getCode() {
        return code == null ? "" : code;
    }

    public void setCode(String code) {
        this.code = code;
    }
}
